﻿using Gargoyle.Roton;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Gargoyle.ZZT
{
    static class ParameterList
    {
        private static ByteString[] Colors()
        {
            ByteString[] result = new ByteString[]{
                new ByteString{},
                "Blue",
                "Green",
                "Cyan",
                "Red",
                "Purple",
                "Yellow",
                "White",
            };
            return result;
        }

        private static Vector[] CardinalVectors()
        {
            return new Vector[]
            {
                new Vector(0, -1),
                new Vector(0, 1),
                new Vector(-1, 0),
                new Vector(1, 0)
            };
        }

        private static Vector[] ConveyorVectors()
        {
            return new Vector[]
            {
                new Vector(-1, 1),
                new Vector(0, 1),
                new Vector(1, 1),
                new Vector(1, 0),
                new Vector(1, -1),
                new Vector(0, -1),
                new Vector(-1, -1),
                new Vector(-1, 0)
            };
        }

        public static Parameters ZZT()
        {
            Parameters result = new Parameters();
            result.AdjacentUnderThings = false;
            result.AmmoPerPickup = 5;
            result.BoardExtension = "BRD";
            result.BoardHeight = 25;
            result.BoardNameLength = 50;
            result.BoardWidth = 60;
            result.BombedLabel = "BOMBED";
            result.BottomRowPutBug = true;
            result.BroadcastTarget = "ALL";
            result.BuggyPassages = true;
            result.CardinalVectors = CardinalVectors();
            result.Colors = Colors();
            result.ConveyorVectors = ConveyorVectors();
            result.DeathColorMatch = true;
            result.DefaultObjectName = "Interaction";
            result.DefaultScrollName = "Scroll";
            result.DisplayWide = false;
            result.EnableGameSpeedChange = true;
            result.EnergizeLabel = "ENERGIZED";
            result.EnterAlert = false;
            result.ForcePlayerColor = true;
            result.ForestToFloor = false;
            result.FlagNameLength = 20;
            result.HealthPerGem = 1;
            result.HelpExtension = "HLP";
            result.HighScoreCount = 30;
            result.HighScoreExtension = "HI";
            result.HighScoreLength = 50;
            result.HintsEnabled = false;
            result.KeyCount = 7;
            result.LabelLengthLimit = true;
            result.MaxBoards = 101;
            result.MaxCommands = 32;
            result.MaxFlags = 10;
            result.MaxThings = 151;
            result.MessageLines = 1;
            result.MessageOnBorder = true;
            result.MultiMovement = false;
            result.PickupToFloor = false;
            result.PlayKey = Keys.P;
            result.PreKillObject = true;
            result.RestartLabel = "RESTART";
            result.RiverEnabled = false;
            result.SavedGameExtension = "SAV";
            result.ShotLabel = "SHOT";
            result.SoundDataSize = 256;
            result.StonesEnabled = false;
            result.ThudLabel = "THUD";
            result.TicksPerSecond = 72;
            result.TorchesEnabled = true;
            result.TouchLabel = "TOUCH";
            result.WorldExtension = "ZZT";
            result.WorldNameLength = 20;

            result.AmmoMessage = "Ammunition - % shots per container.";
            result.BombMessage = "Bomb activated!";
            result.CantShootMessage = "Can't shoot in this place!";
            result.DoorLockedMessage = "The $ door is locked!";
            result.DoorOpenMessage = "The $ door is now open.";
            result.EnergizerMessage = "Energizer - You are invincible";
            result.FakeWallMessage = "A fake wall - secret passage!";
            result.ForestMessage = "A path is cleared through the forest.";
            result.GameOverMessage = "Game over  -  Press ESCAPE";
            result.GemMessage = "Gems give you health!";
            result.InvisibleMessage = "You are blocked by an invisible wall.";
            result.KeyMessage = "You now have the $ key.";
            result.KeyAlreadyMessage = "You already have a $ key!";
            result.NoAmmoMessage = "You don't have any ammo!";
            result.NotDarkMessage = "Don't need torch - room is not dark!";
            result.NoTimeMessage = "Running out of time!";
            result.NoTorchMessage = "You don't have any torches!";
            result.OuchMessage = "Ouch!";
            result.PressEnterMessage = (ByteString)(174) + "Press ENTER to select this" + (ByteString)(175);
            result.TorchMessage = "Torch - used for lighting in the underground.";
            result.WaterMessage = "Your way is blocked by water.";
            
            return result;
        }

        public static Parameters SuperZZT()
        {
            Parameters result = new Parameters();
            result.AdjacentUnderThings = true;
            result.AmmoPerPickup = 20;
            result.BoardExtension = "BRD";
            result.BoardHeight = 80;
            result.BoardNameLength = 60;
            result.BoardWidth = 96;
            result.BombedLabel = "BOMBED";
            result.BottomRowPutBug = false;
            result.BroadcastTarget = "ALL";
            result.BuggyPassages = false;
            result.CardinalVectors = CardinalVectors();
            result.Colors = Colors();
            result.ConveyorVectors = ConveyorVectors();
            result.DeathColorMatch = false;
            result.DefaultObjectName = "Interaction";
            result.DefaultScrollName = "Scroll";
            result.DisplayWide = true;
            result.EnableGameSpeedChange = false;
            result.EnergizeLabel = "ENERGIZED";
            result.EnterAlert = true;
            result.EnterLabel = "ENTER";
            result.FlagNameLength = 20;
            result.ForcePlayerColor = false;
            result.ForestToFloor = true;
            result.HealthPerGem = 10;
            result.HelpExtension = "HLP";
            result.HighScoreCount = 30;
            result.HighScoreExtension = "HGS";
            result.HighScoreLength = 60;
            result.HintLabel = "HINT";
            result.HintsEnabled = true;
            result.KeyCount = 7;
            result.LabelLengthLimit = true;
            result.MaxBoards = 33;
            result.MaxCommands = 32;
            result.MaxFlags = 16;
            result.MaxThings = 129;
            result.MessageLines = 2;
            result.MessageOnBorder = false;
            result.MultiMovement = true;
            result.PickupToFloor = true;
            result.PlayKey = Keys.Enter;
            result.PreKillObject = false;
            result.RestartLabel = "RESTART";
            result.RiverEnabled = true;
            result.SavedGameExtension = "SAV";
            result.ShotLabel = "SHOT";
            result.SoundDataSize = 256;
            result.StonesEnabled = true;
            result.ThudLabel = "THUD";
            result.TicksPerSecond = 72;
            result.TorchesEnabled = false;
            result.TouchLabel = "TOUCH";
            result.WorldExtension = "SZT";
            result.WorldNameLength = 20;

            result.AmmoMessage = "Ammunition:\r% shots";
            result.BombMessage = "Bomb activated!";
            result.CantShootMessage = "Can't shoot\rin this place!";
            result.DoorLockedMessage = "The $ door\ris locked!";
            result.DoorOpenMessage = "The $ door\ris now open.";
            result.EnergizerMessage = "Shield:\rYou are invincible";
            result.FakeWallMessage = "A fake wall:\rSecret Passage!";
            result.ForestMessage = "A path is cleared\rthrough the forest.";
            result.GameOverMessage = "Game over\r-- Press ESCAPE --";
            result.GemMessage = "Gems give you health!";
            result.InvisibleMessage = "You are blocked\rby an invisible wall.";
            result.KeyMessage = "You now have the\r$ key.";
            result.KeyAlreadyMessage = "You already have a\r$ key!";
            result.NoAmmoMessage = "You don't have\rany ammo!";
            result.NoTimeMessage = "Running out of time!";
            result.OuchMessage = "Ouch!";
            result.PressEnterMessage = "Press ENTER to select this";
            result.StoneMessage = "You have found a\rStone of Power!";
            result.WaterMessage = "Your way is\rblocked by lava.";

            return result;
        }
    }
}
